HTTP_SERVER=http_server
PARSER=parser
CC=g++
CFLAGS=-std=c++17

.PHONY:all
all: $(PARSER) $(HTTP_SERVER)

$(PARSER): source/parser.cc
	$(CC) -o $@ $^ -lboost_system -lboost_filesystem -std=c++11

$(HTTP_SERVER): source/HttpServer.cc 
	$(CC) -o $@ source/HttpServer.cc /usr/local/lib/libredis++.a /usr/lib/x86_64-linux-gnu/libhiredis.a -ljsoncpp -lpthread -lmysqlclient -lpthread $(CFLAGS)

.PHONY:clean
clean:
	rm -f $(PARSER) $(HTTP_SERVER)